package day9.Exer;

import java.io.*;
import java.util.Properties;

public class Exer4 {
    public static void main(String[] args) {
        Properties p=new Properties();
        p.setProperty("账号","admin");
        p.setProperty("密码","123456");
        BufferedReader rd=null;
        try {
            p.store(new FileWriter("E:\\java\\作业\\a.txt"),null);
            rd=new BufferedReader(new FileReader("E:\\java\\作业\\a.txt"));
            String str=null;
            while ((str=rd.readLine())!=null){
                System.out.println(str);
            }
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            if (rd!=null){
                try {
                    rd.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }

    }
}
